<template>
	<view class="top">
		<view class="left">{{ props.title }}</view>
		<view class="right" v-if="props.flag" @click="activityList">
			<text>查看全部</text>
			<image src="../static/icons/右箭头 (1).png" mode=""></image>
		</view>
	</view>
</template>

<script setup>
	const props = defineProps({});
	const activityList = () => {
		uni.navigateTo({
			url: '/pages/activity/activity'
		});
	};
</script>

<style lang="scss">
	.top {
		width: 100%;
		height: 80rpx;
		display: flex;
		align-items: center;
		justify-content: space-between;

		.left::before {
			content: '|';
			width: 18rpx;
			height: 40rpx;
			display: inline-block;
			vertical-align: middle;
			text-align: center;
			line-height: 40rpx;
			border-radius: 20rpx;
			color: #006eff;
			background-color: #006eff;
			margin-right: 20rpx;
		}

		.right {
			display: flex;
			align-items: center;
			color: #d3d3d3;

			image {
				width: 40rpx;
				height: 40rpx;
			}
		}
	}
</style>